<%@page contentType="text/html;charset=utf-8" pageEncoding="UTF-8" %>
<%@taglib prefix="h" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="b" uri="http://struts.apache.org/tags-bean" %>
<h1><b:message key="regions_create"/></h1>
<div id ="regionForm">
<fieldset>

    <h:form styleId="addRegionForm" action="/protected/region?method=${param['method']}">        
        <table border="0">
                <tr>
                    <td><span class="important"><b:message key="regions_name"/></span></td>
                    <td><h:text  styleClass="required" property="name" size="100" maxlength="512"/><span class="error" ><h:errors property="name" /></span></td>
                </tr>
                <tr>
                    <td><b:message key="gen_note"/></td>
                    <td><h:textarea property="note" cols="100" rows="10"/></td>
                </tr>
        </table>


        <c:if test="${param['method'] == 'showCreateRegionForm'}">
            <h:submit property="submit"><b:message key="gen_create"/></h:submit>
        </c:if>

        <c:if test="${param['method'] == 'showUpdateRegionForm'}">
            <h:submit property="submit"><b:message key="gen_update"/></h:submit>
        </c:if>

        <!--<h:cancel onclick="$('#regionDialog').dialog('close');return false;"><b:message key="gen_cancel"/></h:cancel>-->
    	<input type="reset" value="<b:message key="gen_cancel"/>" onclick="cancelForm();"/>
    </h:form>
	
</fieldset>
</div>
<script type="text/javascript">
function cancelForm(){
		history.go(-1);
}
</script>
